/**
 * 
 */
package com.inherit.zx;

/**
 * @author:ZX202
 * @time:11:22:59 AM
 */
public class Person1 {
	String name;
	int age;
	/**
	 * @param name
	 * @param age
	 */
	public Person1(String name, int age) {
		super();
		this.name = name;
		this.age = age;
	}
	public String toString() {
		return age+"\t"+name; 
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + age;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}
	@Override
	public boolean equals(java.lang.Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Person1 other = (Person1) obj;
		if (age != other.age)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
}
